import type { PropType } from 'vue'
import type { TableColumn } from './types'

export const virtualTableProps = {
  /** 列定义 */
  columns: { type: Array as PropType<TableColumn[]>, required: true },
  /** 行数据 */
  data: { type: Array as PropType<Record<string, unknown>[]>, required: true },
  /** 开启可变行高 */
  variableRowHeight: { type: Boolean, default: false },
  /** 行高预估值 */
  estimatedRowHeight: { type: Number, default: 40 },
  /** 额外缓存渲染行数 */
  overscanRowCount: { type: Number, default: 5 },
  /** 默认展开的行 */
  defaultExpandedKeys: { type: Array as PropType<(string|number)[]>, default: () => [] },
} as const